package br.com.simora.manager;

import java.util.concurrent.ThreadFactory;

public class SimoraThreadFactory implements ThreadFactory {
	private String name;
	final ThreadGroup group;
	
	public SimoraThreadFactory(String name){
		SecurityManager s = System.getSecurityManager();
	    group = (s != null)? s.getThreadGroup() :
	                         Thread.currentThread().getThreadGroup();
		this.name = name;
	};
	
	@Override
	public Thread newThread(Runnable r) {
		return new Thread(group, r, name);
	}

}
